<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ include file="/inc.jsp"%>
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JSP</title>
</head>
<body>
    <shiro:principal/>
    <shiro:notAuthenticated><a href="/login.jsp?returnUrl=<%=request.getRequestURL()%>">登陆</a></shiro:notAuthenticated>
    <shiro:authenticated><a href="/loginout">退出</a></shiro:authenticated>
    <shiro:hasRole name="admin"><a href="/admin/list">管理员界面</a></shiro:hasRole>
    <h1>首页</h1>
    <h1>信息列表</h1>
    <table>
        <tr>
            <td>内容</td>
            <td>操作</td>
        </tr>
        <s:iterator value="#informations">
            <tr>
                <td>${content}</td>
                <td><a href="/information/edit?id=${id}">修改</a><a href="/information/delete?id=${id}">删除</a></td>
            </tr>
        </s:iterator>
    </table>
    <shiro:authenticated><a href="/information/add">信息添加</a></shiro:authenticated>


</body>
</html>
